package com.tutu.jwt.config;

import com.tutu.jwt.interceptor.JWTInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Program: SpringBoot
 * @Description: 拦截器配置
 * @Author: JK.TuTu
 * @ @Version: 1.0
 * @Create: 2022-11-28 22:18
 **/
public class InterceptorConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new JWTInterceptor())
                .addPathPatterns("user/remove")
                .excludePathPatterns("user/login");
    }
}
